home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 January: Mac OS SDK / Dev.CD Jan 97 SDK1.toast / Development Kits (Disc 1) / Interfaces&Libraries / Interfaces / AIncludes / TextEdit.a < prev    next >
Encoding:
Text File  |  1996-01-24  |  21.6 KB  |  861 lines  |  [TEXT/MPS ]

  1. ;
  2. ;    File:        TextEdit.a
  3. ;
  4. ;    Contains:    TextEdit Interfaces.
  5. ;
  6. ;    Version:    Technology:    System 7.5
  7. ;                Package:    Universal Interfaces 2.2 in “MPW” on ETO #20
  8. ;
  9. ;    Copyright:    © 1984-1995 by Apple Computer, Inc.
  10. ;                All rights reserved.
  11. ;
  12. ;    Bugs?:        If you find a problem with this file, use the Apple Bug Reporter
  13. ;                stack.  Include the file and version information (from above)
  14. ;                in the problem description and send to:
  15. ;                    Internet:    apple.bugs@applelink.apple.com
  16. ;                    AppleLink:    APPLE.BUGS
  17. ;
  18. ;
  19.  
  20.     IF &TYPE('__TEXTEDIT__') = 'UNDEFINED' THEN
  21. __TEXTEDIT__ SET 1
  22.  
  23.  
  24.     IF &TYPE('__TYPES__') = 'UNDEFINED' THEN
  25.     include 'Types.a'
  26.     ENDIF
  27. ;        include 'ConditionalMacros.a'                                ;
  28.  
  29.     IF &TYPE('__QUICKDRAW__') = 'UNDEFINED' THEN
  30.     include 'Quickdraw.a'
  31.     ENDIF
  32. ;        include 'MixedMode.a'                                        ;
  33. ;        include 'QuickdrawText.a'                                    ;
  34.  
  35.     IF &TYPE('__MIXEDMODE__') = 'UNDEFINED' THEN
  36.     include 'MixedMode.a'
  37.     ENDIF
  38. ; typedef struct TERec         TERec, *TEPtr, **TEHandle
  39. ;    Important note about TEClickLoopProcPtr and WordBreakProcPtr
  40. ;
  41. ;    At one point these were defined as returning the function result in the 
  42. ;    condition code Z-bit.  This was correct, in that it was what the 68K
  43. ;    implementation of TextEdit actually tested.  But, MixedMode had a different 
  44. ;    idea of what returning a boolean in the Z-bit meant.  MixedMode was setting
  45. ;    the Z-bit the complement of what was wanted.  
  46. ;    
  47. ;    Therefore, these ProcPtrs have been changed (back) to return the result in
  48. ;    register D0.  It turns out that for register based routines, 
  49. ;    MixedMode sets the Z-bit of the 68K emulator based on the contents 
  50. ;    of the return result register.  Thus we can get the Z-bit set correctly.  
  51. ;    
  52. ;    But, when TextEdit is recoded in PowerPC, if it calls a 68K ClickLoop
  53. ;    or WordBreak routine, register D0 had better have the result (in addition
  54. ;    to the Z-bit). Therefore all 68K apps should make sure their ClickLoop or
  55. ;    WordBreak routines set register D0 at the end.
  56. ;
  57. ;
  58. ;    The following ProcPtrs cannot be written in or called from a high-level 
  59. ;    language without the help of mixed mode or assembly glue because they 
  60. ;    use the following parameter-passing conventions:
  61. ;
  62. ;    typedef pascal void (*HighHookProcPtr)(const Rect *r, TEPtr pTE);
  63. ;    typedef pascal void (*CaretHookProcPtr)(const Rect *r, TEPtr pTE);
  64. ;
  65. ;        In:
  66. ;            =>     r                        on stack
  67. ;            =>    pTE                        A3.L
  68. ;        Out:
  69. ;            none
  70. ;
  71. ;    typedef pascal Boolean (*EOLHookProcPtr)(char theChar, TEPtr pTE, TEHandle hTE);
  72. ;
  73. ;        In:
  74. ;            =>     theChar                    D0.B
  75. ;            =>    pTE                        A3.L
  76. ;            =>    hTE                        A4.L
  77. ;        Out:
  78. ;            <=    Boolean                    Z bit of the CCR
  79. ;
  80. ;    typedef pascal unsigned short (*WidthHookProcPtr)(unsigned short textLen,
  81. ;     unsigned short textOffset, void *textBufferPtr, TEPtr pTE, TEHandle hTE);
  82. ;    typedef pascal unsigned short (*TextWidthHookProcPtr)(unsigned short textLen,
  83. ;     unsigned short textOffset, void *textBufferPtr, TEPtr pTE, TEHandle hTE);
  84. ;
  85. ;        In:
  86. ;            =>     textLen                    D0.W
  87. ;            =>    textOffset                D1.W
  88. ;            =>    textBufferPtr            A0.L
  89. ;            =>    pTE                        A3.L
  90. ;            =>    hTE                        A4.L
  91. ;        Out:
  92. ;            <=    unsigned short            D1.W
  93. ;
  94. ;    typedef pascal unsigned short (*NWidthHookProcPtr)(unsigned short styleRunLen,
  95. ;     unsigned short styleRunOffset, short slop, short direction, void *textBufferPtr, 
  96. ;     short *lineStart, TEPtr pTE, TEHandle hTE);
  97. ;
  98. ;        In:
  99. ;            =>     styleRunLen                D0.W
  100. ;            =>    styleRunOffset            D1.W
  101. ;            =>    slop                    D2.W (low)
  102. ;            =>    direction                D2.W (high)
  103. ;            =>    textBufferPtr            A0.L
  104. ;            =>    lineStart                A2.L
  105. ;            =>    pTE                        A3.L
  106. ;            =>    hTE                        A4.L
  107. ;        Out:
  108. ;            <=    unsigned short            D1.W
  109. ;
  110. ;    typedef pascal void (*DrawHookProcPtr)(unsigned short textOffset, unsigned short drawLen,
  111. ;     void *textBufferPtr, TEPtr pTE, TEHandle hTE);
  112. ;
  113. ;        In:
  114. ;            =>     textOffset                D0.W
  115. ;            =>    drawLen                    D1.W
  116. ;            =>    textBufferPtr            A0.L
  117. ;            =>    pTE                        A3.L
  118. ;            =>    hTE                        A4.L
  119. ;        Out:
  120. ;            none
  121. ;
  122. ;    typedef pascal Boolean (*HitTestHookProcPtr)(unsigned short styleRunLen,
  123. ;     unsigned short styleRunOffset, unsigned short slop, void *textBufferPtr,
  124. ;     TEPtr pTE, TEHandle hTE, unsigned short *pixelWidth, unsigned short *charOffset, 
  125. ;     Boolean *pixelInChar);
  126. ;
  127. ;        In:
  128. ;            =>     styleRunLen                D0.W
  129. ;            =>    styleRunOffset            D1.W
  130. ;            =>    slop                    D2.W
  131. ;            =>    textBufferPtr            A0.L
  132. ;            =>    pTE                        A3.L
  133. ;            =>    hTE                        A4.L
  134. ;        Out:
  135. ;            <=    pixelWidth                D0.W (low)
  136. ;            <=    Boolean                    D0.W (high)
  137. ;            <=    charOffset                D1.W
  138. ;            <=    pixelInChar                D2.W
  139. ;
  140. ;    typedef pascal void (*TEFindWordProcPtr)(unsigned short currentPos, short caller, 
  141. ;     TEPtr pTE, TEHandle hTE, unsigned short *wordStart, unsigned short *wordEnd);
  142. ;
  143. ;        In:
  144. ;            =>     currentPos                D0.W
  145. ;            =>    caller                    D2.W
  146. ;            =>    pTE                        A3.L
  147. ;            =>    hTE                        A4.L
  148. ;        Out:
  149. ;            <=    wordStart                D0.W
  150. ;            <=    wordEnd                    D1.W
  151. ;
  152. ;    typedef pascal void (*TERecalcProcPtr)(TEPtr pTE, unsigned short changeLength,
  153. ;       unsigned short *lineStart, unsigned short *firstChar, unsigned short *lastChar);
  154. ;
  155. ;        In:
  156. ;            =>     pTE                        A3.L
  157. ;            =>    changeLength            D7.W
  158. ;        Out:
  159. ;            <=    lineStart                D2.W
  160. ;            <=    firstChar                D3.W
  161. ;            <=    lastChar                D4.W
  162. ;
  163. ;    typedef pascal void (*TEDoTextProcPtr)(TEPtr pTE, unsigned short firstChar, unsigned short lastChar,
  164. ;                         short selector, GrafPtr *currentGrafPort, short *charPosition);
  165. ;
  166. ;        In:
  167. ;            =>     pTE                        A3.L
  168. ;            =>    firstChar                D3.W
  169. ;            =>    lastChar                D4.W
  170. ;            =>    selector                D7.W
  171. ;        Out:
  172. ;            <=    currentGrafPort            A0.L
  173. ;            <=    charPosition            D0.W
  174. ;            
  175. ;
  176. TERec                     RECORD    0
  177. destRect                 ds     Rect    ; offset: $0 (0)
  178. viewRect                 ds     Rect    ; offset: $8 (8)
  179. selRect                     ds     Rect    ; offset: $10 (16)
  180. lineHeight                 ds.w   1        ; offset: $18 (24)
  181. fontAscent                 ds.w   1        ; offset: $1A (26)
  182. selPoint                 ds     Point    ; offset: $1C (28)
  183. selStart                 ds.w   1        ; offset: $20 (32)
  184. selEnd                     ds.w   1        ; offset: $22 (34)
  185. active                     ds.w   1        ; offset: $24 (36)
  186. wordBreak                 ds.l   1        ; offset: $26 (38)
  187. clickLoop                 ds.l   1        ; offset: $2A (42)
  188. clickTime                 ds.l   1        ; offset: $2E (46)
  189. clickLoc                 ds.w   1        ; offset: $32 (50)
  190. caretTime                 ds.l   1        ; offset: $34 (52)
  191. caretState                 ds.w   1        ; offset: $38 (56)
  192. just                     ds.w   1        ; offset: $3A (58)
  193. teLength                 ds.w   1        ; offset: $3C (60)
  194. hText                     ds.l   1        ; offset: $3E (62)
  195. hDispatchRec             ds.l   1        ; offset: $42 (66)        ; added to replace recalBack & recalLines.  it's a handle anyway 
  196. clikStuff                 ds.w   1        ; offset: $46 (70)
  197. crOnly                     ds.w   1        ; offset: $48 (72)
  198. txFont                     ds.w   1        ; offset: $4A (74)
  199. txFace                     ds.b   1        ; offset: $4C (76)        ;txFace is unpacked byte
  200. filler                     ds.b   1        ; offset: $4D (77)
  201. txMode                     ds.w   1        ; offset: $4E (78)
  202. txSize                     ds.w   1        ; offset: $50 (80)
  203. inPort                     ds.l   1        ; offset: $52 (82)
  204. highHook                 ds.l   1        ; offset: $56 (86)
  205. caretHook                 ds.l   1        ; offset: $5A (90)
  206. nLines                     ds.w   1        ; offset: $5E (94)
  207. lineStarts                 ds.w   16001    ; offset: $60 (96)
  208. sizeof                     EQU *            ; size:   $7D62 (32098)
  209.                         ENDR
  210.  
  211.  
  212. ; Justification (word alignment) styles 
  213. teJustLeft                        EQU        0
  214. teJustCenter                    EQU        1
  215. teJustRight                        EQU        -1
  216. teForceLeft                        EQU        -2
  217. ; new names for the Justification (word alignment) styles 
  218. teFlushDefault                    EQU        0                    ;flush according to the line direction 
  219. teCenter                        EQU        1                    ;center justify (word alignment) 
  220. teFlushRight                    EQU        -1                    ;flush right for all scripts 
  221. teFlushLeft                        EQU        -2                    ;flush left for all scripts 
  222. ; Set/Replace style modes 
  223. fontBit                            EQU        0                    ;set font
  224. faceBit                            EQU        1                    ;set face
  225. sizeBit                            EQU        2                    ;set size
  226. clrBit                            EQU        3                    ;set color
  227. addSizeBit                        EQU        4                    ;add size mode
  228. toggleBit                        EQU        5                    ;set faces in toggle mode
  229. toglBit                            EQU        5                    ; obsolete.  use toggleBit 
  230. ; TESetStyle/TEContinuousStyle modes 
  231. doFont                            EQU        1                    ; set font (family) number
  232. doFace                            EQU        2                    ;set character style
  233. doSize                            EQU        4                    ;set type size
  234. doColor                            EQU        8                    ;set color
  235. doAll                            EQU        15                    ;set all attributes
  236. addSize                            EQU        16                    ;adjust type size
  237.  
  238. doToggle                        EQU        32                    ;toggle mode for TESetStyle
  239. ; offsets into TEDispatchRec 
  240. EOLHook                            EQU        0                    ;[UniversalProcPtr] TEEOLHook
  241. DRAWHook                        EQU        4                    ;[UniversalProcPtr] TEWidthHook
  242. WIDTHHook                        EQU        8                    ;[UniversalProcPtr] TEDrawHook
  243. HITTESTHook                        EQU        12                    ;[UniversalProcPtr] TEHitTestHook
  244. nWIDTHHook                        EQU        24                    ;[UniversalProcPtr] nTEWidthHook
  245. TextWidthHook                    EQU        28                    ;[UniversalProcPtr] TETextWidthHook
  246. ; selectors for TECustomHook 
  247. intEOLHook                        EQU        0                    ;TEIntHook value
  248. intDrawHook                        EQU        1                    ;TEIntHook value
  249. intWidthHook                    EQU        2                    ;TEIntHook value
  250. intHitTestHook                    EQU        3                    ;TEIntHook value
  251. intNWidthHook                    EQU        6                    ;TEIntHook value for new version of WidthHook
  252. intTextWidthHook                EQU        7                    ;TEIntHook value for new TextWidthHook
  253. teFAutoScroll                    EQU        0                    ;00000001b
  254. teFAutoScr                        EQU        0                    ;00000001b  obsolete. use teFAutoScroll
  255. teFTextBuffering                EQU        1                    ;00000010b
  256. teFOutlineHilite                EQU        2                    ;00000100b
  257. teFInlineInput                    EQU        3                    ;00001000b 
  258. teFUseTextServices                EQU        4                    ;00010000b 
  259.  
  260. ; action for the new "bit (un)set" interface, TEFeatureFlag 
  261. teBitClear                        EQU        0
  262. teBitSet                        EQU        1                    ;set the selector bit
  263. teBitTest                        EQU        -1                    ;no change; just return the current setting
  264. ;constants for identifying the routine that called FindWord 
  265. teWordSelect                    EQU        4                    ;clickExpand to select word
  266. teWordDrag                        EQU        8                    ;clickExpand to drag new word
  267. teFromFind                        EQU        12                    ;FindLine called it ($0C)
  268. teFromRecal                        EQU        16                    ;RecalLines called it ($10)      obsolete 
  269. ;constants for identifying TEDoText selectors 
  270. teFind                            EQU        0                    ;TEDoText called for searching
  271. teHighlight                        EQU        1                    ;TEDoText called for highlighting
  272. teDraw                            EQU        -1                    ;TEDoText called for drawing text
  273. teCaret                            EQU        -2                    ;TEDoText called for drawing the caret
  274.  
  275. ; typedef char                 Chars[32001]
  276. ; typedef CharsPtr             *CharsHandle
  277. StyleRun                 RECORD    0
  278. startChar                 ds.w   1        ; offset: $0 (0)        ;starting character position
  279. styleIndex                 ds.w   1        ; offset: $2 (2)        ;index in style table
  280. sizeof                     EQU *            ; size:   $4 (4)
  281.                         ENDR
  282.  
  283. ; typedef struct StyleRun     StyleRun
  284. STElement                 RECORD    0
  285. stCount                     ds.w   1        ; offset: $0 (0)        ;number of runs in this style
  286. stHeight                 ds.w   1        ; offset: $2 (2)        ;line height
  287. stAscent                 ds.w   1        ; offset: $4 (4)        ;font ascent
  288. stFont                     ds.w   1        ; offset: $6 (6)        ;font (family) number
  289. stFace                     ds.b   1        ; offset: $8 (8)        ;character Style
  290. filler                     ds.b   1        ; offset: $9 (9)        ;stFace is unpacked byte
  291. stSize                     ds.w   1        ; offset: $A (10)        ;size in points
  292. stColor                     ds     RGBColor ; offset: $C (12)        ;absolute (RGB) color
  293. sizeof                     EQU *            ; size:   $12 (18)
  294.                         ENDR
  295.  
  296. ; typedef struct STElement     STElement
  297. ; typedef STElement         TEStyleTable[1777]
  298. LHElement                 RECORD    0
  299. lhHeight                 ds.w   1        ; offset: $0 (0)        ;maximum height in line
  300. lhAscent                 ds.w   1        ; offset: $2 (2)        ;maximum ascent in line
  301. sizeof                     EQU *            ; size:   $4 (4)
  302.                         ENDR
  303.  
  304. ; typedef struct LHElement     LHElement
  305. ; typedef LHElement         LHTable[8001]
  306. ScrpSTElement             RECORD    0
  307. scrpStartChar             ds.l   1        ; offset: $0 (0)        ;starting character position
  308. scrpHeight                 ds.w   1        ; offset: $4 (4)        ;starting character position
  309. scrpAscent                 ds.w   1        ; offset: $6 (6)
  310. scrpFont                 ds.w   1        ; offset: $8 (8)
  311. scrpFace                 ds.b   1        ; offset: $A (10)        ;unpacked byte
  312. filler                     ds.b   1        ; offset: $B (11)        ;scrpFace is unpacked byte
  313. scrpSize                 ds.w   1        ; offset: $C (12)
  314. scrpColor                 ds     RGBColor ; offset: $E (14)
  315. sizeof                     EQU *            ; size:   $14 (20)
  316.                         ENDR
  317.  
  318. ; typedef struct ScrpSTElement  ScrpSTElement
  319. ; ARRAY [0..1600] OF ScrpSTElement 
  320. ; typedef ScrpSTElement     ScrpSTTable[1601]
  321. StScrpRec                 RECORD    0
  322. scrpNStyles                 ds.w   1        ; offset: $0 (0)        ;number of styles in scrap
  323. scrpStyleTab             ds.l   8005    ; offset: $2 (2)        ;table of styles for scrap
  324. sizeof                     EQU *            ; size:   $7D16 (32022)
  325.                         ENDR
  326.  
  327. ; typedef struct StScrpRec     StScrpRec
  328. ; typedef StScrpRec         *StScrpPtr, **StScrpHandle
  329. NullStRec                 RECORD    0
  330. teReserved                 ds.l   1        ; offset: $0 (0)        ;reserved for future expansion
  331. nullScrap                 ds.l   1        ; offset: $4 (4)        ;handle to scrap style table
  332. sizeof                     EQU *            ; size:   $8 (8)
  333.                         ENDR
  334.  
  335. ; typedef struct NullStRec     NullStRec
  336. ; typedef NullStRec         *NullStPtr, **NullStHandle
  337. TEStyleRec                 RECORD    0
  338. nRuns                     ds.w   1        ; offset: $0 (0)        ;number of style runs
  339. nStyles                     ds.w   1        ; offset: $2 (2)        ;size of style table
  340. styleTab                 ds.l   1        ; offset: $4 (4)        ;handle to style table
  341. lhTab                     ds.l   1        ; offset: $8 (8)        ;handle to line-height table
  342. teRefCon                 ds.l   1        ; offset: $C (12)        ;reserved for application use
  343. nullStyle                 ds.l   1        ; offset: $10 (16)        ;Handle to style set at null selection
  344. runs                     ds.b   8001 * StyleRun.sizeof ; offset: $14 (20) ;ARRAY [0..8000] OF StyleRun
  345. sizeof                     EQU *            ; size:   $7D18 (32024)
  346.                         ENDR
  347.  
  348. ; typedef struct TEStyleRec  TEStyleRec
  349. ; typedef TEStyleRec         *TEStylePtr, **TEStyleHandle
  350. TextStyle                 RECORD    0
  351. tsFont                     ds.w   1        ; offset: $0 (0)        ;font (family) number
  352. tsFace                     ds.b   1        ; offset: $2 (2)        ;character Style
  353. filler                     ds.b   1        ; offset: $3 (3)        ;tsFace is unpacked byte
  354. tsSize                     ds.w   1        ; offset: $4 (4)        ;size in point
  355. tsColor                     ds     RGBColor ; offset: $6 (6)        ;absolute (RGB) color
  356. sizeof                     EQU *            ; size:   $C (12)
  357.                         ENDR
  358.  
  359. ; typedef struct TextStyle     TextStyle
  360. ; typedef TextStyle         *TextStylePtr, **TextStyleHandle
  361. ; typedef short             TEIntHook
  362. ;
  363. ; pascal Handle TEScrapHandle(void)
  364. ;
  365.     IF ¬ GENERATINGCFM THEN
  366.         Macro
  367.         _TEScrapHandle         &dest=(sp)
  368.         move.l               $0AB4,&dest
  369.         EndM
  370.     ELSE
  371.         IMPORT_CFM_FUNCTION    TEScrapHandle
  372.     ENDIF
  373.  
  374. ;
  375. ; pascal void TEInit(void)
  376. ;
  377.     IF ¬ GENERATINGCFM THEN
  378.         _TEInit:    OPWORD    $A9CC
  379.     ELSE
  380.         IMPORT_CFM_FUNCTION    TEInit
  381.     ENDIF
  382.  
  383. ;
  384. ; pascal TEHandle TENew(const Rect *destRect, const Rect *viewRect)
  385. ;
  386.     IF ¬ GENERATINGCFM THEN
  387.         _TENew:    OPWORD    $A9D2
  388.     ELSE
  389.         IMPORT_CFM_FUNCTION    TENew
  390.     ENDIF
  391.  
  392. ;
  393. ; pascal void TEDispose(TEHandle hTE)
  394. ;
  395.     IF ¬ GENERATINGCFM THEN
  396.         _TEDispose:    OPWORD    $A9CD
  397.     ELSE
  398.         IMPORT_CFM_FUNCTION    TEDispose
  399.     ENDIF
  400.  
  401. ;
  402. ; pascal void TESetText(const void *text, long length, TEHandle hTE)
  403. ;
  404.     IF ¬ GENERATINGCFM THEN
  405.         _TESetText:    OPWORD    $A9CF
  406.     ELSE
  407.         IMPORT_CFM_FUNCTION    TESetText
  408.     ENDIF
  409.  
  410. ;
  411. ; pascal CharsHandle TEGetText(TEHandle hTE)
  412. ;
  413.     IF ¬ GENERATINGCFM THEN
  414.         _TEGetText:    OPWORD    $A9CB
  415.     ELSE
  416.         IMPORT_CFM_FUNCTION    TEGetText
  417.     ENDIF
  418.  
  419. ;
  420. ; pascal void TEIdle(TEHandle hTE)
  421. ;
  422.     IF ¬ GENERATINGCFM THEN
  423.         _TEIdle:    OPWORD    $A9DA
  424.     ELSE
  425.         IMPORT_CFM_FUNCTION    TEIdle
  426.     ENDIF
  427.  
  428. ;
  429. ; pascal void TESetSelect(long selStart, long selEnd, TEHandle hTE)
  430. ;
  431.     IF ¬ GENERATINGCFM THEN
  432.         _TESetSelect:    OPWORD    $A9D1
  433.     ELSE
  434.         IMPORT_CFM_FUNCTION    TESetSelect
  435.     ENDIF
  436.  
  437. ;
  438. ; pascal void TEActivate(TEHandle hTE)
  439. ;
  440.     IF ¬ GENERATINGCFM THEN
  441.         _TEActivate:    OPWORD    $A9D8
  442.     ELSE
  443.         IMPORT_CFM_FUNCTION    TEActivate
  444.     ENDIF
  445.  
  446. ;
  447. ; pascal void TEDeactivate(TEHandle hTE)
  448. ;
  449.     IF ¬ GENERATINGCFM THEN
  450.         _TEDeactivate:    OPWORD    $A9D9
  451.     ELSE
  452.         IMPORT_CFM_FUNCTION    TEDeactivate
  453.     ENDIF
  454.  
  455. ;
  456. ; pascal void TEKey(asciichar key, TEHandle hTE)
  457. ;
  458.     IF ¬ GENERATINGCFM THEN
  459.         _TEKey:    OPWORD    $A9DC
  460.     ELSE
  461.         IMPORT_CFM_FUNCTION    TEKey
  462.     ENDIF
  463.  
  464. ;
  465. ; pascal void TECut(TEHandle hTE)
  466. ;
  467.     IF ¬ GENERATINGCFM THEN
  468.         _TECut:    OPWORD    $A9D6
  469.     ELSE
  470.         IMPORT_CFM_FUNCTION    TECut
  471.     ENDIF
  472.  
  473. ;
  474. ; pascal void TECopy(TEHandle hTE)
  475. ;
  476.     IF ¬ GENERATINGCFM THEN
  477.         _TECopy:    OPWORD    $A9D5
  478.     ELSE
  479.         IMPORT_CFM_FUNCTION    TECopy
  480.     ENDIF
  481.  
  482. ;
  483. ; pascal void TEPaste(TEHandle hTE)
  484. ;
  485.     IF ¬ GENERATINGCFM THEN
  486.         _TEPaste:    OPWORD    $A9DB
  487.     ELSE
  488.         IMPORT_CFM_FUNCTION    TEPaste
  489.     ENDIF
  490.  
  491. ;
  492. ; pascal void TEDelete(TEHandle hTE)
  493. ;
  494.     IF ¬ GENERATINGCFM THEN
  495.         _TEDelete:    OPWORD    $A9D7
  496.     ELSE
  497.         IMPORT_CFM_FUNCTION    TEDelete
  498.     ENDIF
  499.  
  500. ;
  501. ; pascal void TEInsert(const void *text, long length, TEHandle hTE)
  502. ;
  503.     IF ¬ GENERATINGCFM THEN
  504.         _TEInsert:    OPWORD    $A9DE
  505.     ELSE
  506.         IMPORT_CFM_FUNCTION    TEInsert
  507.     ENDIF
  508.  
  509. ;
  510. ; pascal void TESetAlignment(short just, TEHandle hTE)
  511. ;
  512.     IF ¬ GENERATINGCFM THEN
  513.         _TESetAlignment:    OPWORD    $A9DF
  514.     ELSE
  515.         IMPORT_CFM_FUNCTION    TESetAlignment
  516.     ENDIF
  517.  
  518. ;
  519. ; pascal void TEUpdate(const Rect *rUpdate, TEHandle hTE)
  520. ;
  521.     IF ¬ GENERATINGCFM THEN
  522.         _TEUpdate:    OPWORD    $A9D3
  523.     ELSE
  524.         IMPORT_CFM_FUNCTION    TEUpdate
  525.     ENDIF
  526.  
  527. ;
  528. ; pascal void TETextBox(const void *text, long length, const Rect *box, short just)
  529. ;
  530.     IF ¬ GENERATINGCFM THEN
  531.         _TETextBox:    OPWORD    $A9CE
  532.     ELSE
  533.         IMPORT_CFM_FUNCTION    TETextBox
  534.     ENDIF
  535.  
  536. ;
  537. ; pascal void TEScroll(short dh, short dv, TEHandle hTE)
  538. ;
  539.     IF ¬ GENERATINGCFM THEN
  540.         _TEScroll:    OPWORD    $A9DD
  541.     ELSE
  542.         IMPORT_CFM_FUNCTION    TEScroll
  543.     ENDIF
  544.  
  545. ;
  546. ; pascal void TESelView(TEHandle hTE)
  547. ;
  548.     IF ¬ GENERATINGCFM THEN
  549.         _TESelView:    OPWORD    $A811
  550.     ELSE
  551.         IMPORT_CFM_FUNCTION    TESelView
  552.     ENDIF
  553.  
  554. ;
  555. ; pascal void TEPinScroll(short dh, short dv, TEHandle hTE)
  556. ;
  557.     IF ¬ GENERATINGCFM THEN
  558.         _TEPinScroll:    OPWORD    $A812
  559.     ELSE
  560.         IMPORT_CFM_FUNCTION    TEPinScroll
  561.     ENDIF
  562.  
  563. ;
  564. ; pascal void TEAutoView(Boolean fAuto, TEHandle hTE)
  565. ;
  566.     IF ¬ GENERATINGCFM THEN
  567.         _TEAutoView:    OPWORD    $A813
  568.     ELSE
  569.         IMPORT_CFM_FUNCTION    TEAutoView
  570.     ENDIF
  571.  
  572. ;
  573. ; pascal void TECalText(TEHandle hTE)
  574. ;
  575.     IF ¬ GENERATINGCFM THEN
  576.         _TECalText:    OPWORD    $A9D0
  577.     ELSE
  578.         IMPORT_CFM_FUNCTION    TECalText
  579.     ENDIF
  580.  
  581. ;
  582. ; pascal short TEGetOffset(Point pt, TEHandle hTE)
  583. ;
  584.     IF ¬ GENERATINGCFM THEN
  585.         _TEGetOffset:    OPWORD    $A83C
  586.     ELSE
  587.         IMPORT_CFM_FUNCTION    TEGetOffset
  588.     ENDIF
  589.  
  590. ;
  591. ; pascal Point TEGetPoint(short offset, TEHandle hTE)
  592. ;
  593.     IF ¬ GENERATINGCFM THEN
  594.         Macro
  595.         _TEGetPoint
  596.             move.w    #$0008,-(sp)
  597.             dc.w     $A83D
  598.         EndM
  599.     ELSE
  600.         IMPORT_CFM_FUNCTION    TEGetPoint
  601.     ENDIF
  602.  
  603. ;
  604. ; pascal void TEClick(Point pt, Boolean fExtend, TEHandle h)
  605. ;
  606.     IF ¬ GENERATINGCFM THEN
  607.         _TEClick:    OPWORD    $A9D4
  608.     ELSE
  609.         IMPORT_CFM_FUNCTION    TEClick
  610.     ENDIF
  611.  
  612. ;
  613. ; pascal TEHandle TEStyleNew(const Rect *destRect, const Rect *viewRect)
  614. ;
  615.     IF ¬ GENERATINGCFM THEN
  616.         _TEStyleNew:    OPWORD    $A83E
  617.     ELSE
  618.         IMPORT_CFM_FUNCTION    TEStyleNew
  619.     ENDIF
  620.  
  621. ;
  622. ; pascal void TESetStyleHandle(TEStyleHandle theHandle, TEHandle hTE)
  623. ;
  624.     IF ¬ GENERATINGCFM THEN
  625.         Macro
  626.         _TESetStyleHandle
  627.             move.w    #$0005,-(sp)
  628.             dc.w     $A83D
  629.         EndM
  630.     ELSE
  631.         IMPORT_CFM_FUNCTION    TESetStyleHandle
  632.     ENDIF
  633.  
  634. ;
  635. ; pascal TEStyleHandle TEGetStyleHandle(TEHandle hTE)
  636. ;
  637.     IF ¬ GENERATINGCFM THEN
  638.         Macro
  639.         _TEGetStyleHandle
  640.             move.w    #$0004,-(sp)
  641.             dc.w     $A83D
  642.         EndM
  643.     ELSE
  644.         IMPORT_CFM_FUNCTION    TEGetStyleHandle
  645.     ENDIF
  646.  
  647. ;
  648. ; pascal void TEGetStyle(short offset, TextStyle *theStyle, short *lineHeight, short *fontAscent, TEHandle hTE)
  649. ;
  650.     IF ¬ GENERATINGCFM THEN
  651.         Macro
  652.         _TEGetStyle
  653.             move.w    #$0003,-(sp)
  654.             dc.w     $A83D
  655.         EndM
  656.     ELSE
  657.         IMPORT_CFM_FUNCTION    TEGetStyle
  658.     ENDIF
  659.  
  660. ;
  661. ; pascal void TEStylePaste(TEHandle hTE)
  662. ;
  663.     IF ¬ GENERATINGCFM THEN
  664.         Macro
  665.         _TEStylePaste
  666.             move.w    #$0000,-(sp)
  667.             dc.w     $A83D
  668.         EndM
  669.     ELSE
  670.         IMPORT_CFM_FUNCTION    TEStylePaste
  671.     ENDIF
  672.  
  673. ;
  674. ; pascal void TESetStyle(short mode, const TextStyle *newStyle, Boolean fRedraw, TEHandle hTE)
  675. ;
  676.     IF ¬ GENERATINGCFM THEN
  677.         Macro
  678.         _TESetStyle
  679.             move.w    #$0001,-(sp)
  680.             dc.w     $A83D
  681.         EndM
  682.     ELSE
  683.         IMPORT_CFM_FUNCTION    TESetStyle
  684.     ENDIF
  685.  
  686. ;
  687. ; pascal void TEReplaceStyle(short mode, const TextStyle *oldStyle, const TextStyle *newStyle, Boolean fRedraw, TEHandle hTE)
  688. ;
  689.     IF ¬ GENERATINGCFM THEN
  690.         Macro
  691.         _TEReplaceStyle
  692.             move.w    #$0002,-(sp)
  693.             dc.w     $A83D
  694.         EndM
  695.     ELSE
  696.         IMPORT_CFM_FUNCTION    TEReplaceStyle
  697.     ENDIF
  698.  
  699. ;
  700. ; pascal StScrpHandle TEGetStyleScrapHandle(TEHandle hTE)
  701. ;
  702.     IF ¬ GENERATINGCFM THEN
  703.         Macro
  704.         _TEGetStyleScrapHandle
  705.             move.w    #$0006,-(sp)
  706.             dc.w     $A83D
  707.         EndM
  708.     ELSE
  709.         IMPORT_CFM_FUNCTION    TEGetStyleScrapHandle
  710.     ENDIF
  711.  
  712. ;
  713. ; pascal void TEStyleInsert(const void *text, long length, StScrpHandle hST, TEHandle hTE)
  714. ;
  715.     IF ¬ GENERATINGCFM THEN
  716.         Macro
  717.         _TEStyleInsert
  718.             move.w    #$0007,-(sp)
  719.             dc.w     $A83D
  720.         EndM
  721.     ELSE
  722.         IMPORT_CFM_FUNCTION    TEStyleInsert
  723.     ENDIF
  724.  
  725. ;
  726. ; pascal long TEGetHeight(long endLine, long startLine, TEHandle hTE)
  727. ;
  728.     IF ¬ GENERATINGCFM THEN
  729.         Macro
  730.         _TEGetHeight
  731.             move.w    #$0009,-(sp)
  732.             dc.w     $A83D
  733.         EndM
  734.     ELSE
  735.         IMPORT_CFM_FUNCTION    TEGetHeight
  736.     ENDIF
  737.  
  738. ;
  739. ; pascal Boolean TEContinuousStyle(short *mode, TextStyle *aStyle, TEHandle hTE)
  740. ;
  741.     IF ¬ GENERATINGCFM THEN
  742.         Macro
  743.         _TEContinuousStyle
  744.             move.w    #$000A,-(sp)
  745.             dc.w     $A83D
  746.         EndM
  747.     ELSE
  748.         IMPORT_CFM_FUNCTION    TEContinuousStyle
  749.     ENDIF
  750.  
  751. ;
  752. ; pascal void TEUseStyleScrap(long rangeStart, long rangeEnd, StScrpHandle newStyles, Boolean fRedraw, TEHandle hTE)
  753. ;
  754.     IF ¬ GENERATINGCFM THEN
  755.         Macro
  756.         _TEUseStyleScrap
  757.             move.w    #$000B,-(sp)
  758.             dc.w     $A83D
  759.         EndM
  760.     ELSE
  761.         IMPORT_CFM_FUNCTION    TEUseStyleScrap
  762.     ENDIF
  763.  
  764. ;
  765. ; pascal void TECustomHook(TEIntHook which, UniversalProcPtr *addr, TEHandle hTE)
  766. ;
  767.     IF ¬ GENERATINGCFM THEN
  768.         Macro
  769.         _TECustomHook
  770.             move.w    #$000C,-(sp)
  771.             dc.w     $A83D
  772.         EndM
  773.     ELSE
  774.         IMPORT_CFM_FUNCTION    TECustomHook
  775.     ENDIF
  776.  
  777. ;
  778. ; pascal long TENumStyles(long rangeStart, long rangeEnd, TEHandle hTE)
  779. ;
  780.     IF ¬ GENERATINGCFM THEN
  781.         Macro
  782.         _TENumStyles
  783.             move.w    #$000D,-(sp)
  784.             dc.w     $A83D
  785.         EndM
  786.     ELSE
  787.         IMPORT_CFM_FUNCTION    TENumStyles
  788.     ENDIF
  789.  
  790. ;
  791. ; pascal short TEFeatureFlag(short feature, short action, TEHandle hTE)
  792. ;
  793.     IF ¬ GENERATINGCFM THEN
  794.         Macro
  795.         _TEFeatureFlag
  796.             move.w    #$000E,-(sp)
  797.             dc.w     $A83D
  798.         EndM
  799.     ELSE
  800.         IMPORT_CFM_FUNCTION    TEFeatureFlag
  801.     ENDIF
  802.  
  803. ;
  804. ; pascal OSErr TEGetHiliteRgn(RgnHandle region, TEHandle hTE)
  805. ;
  806.     IF ¬ GENERATINGCFM THEN
  807.         Macro
  808.         _TEGetHiliteRgn
  809.             move.w    #$000F,-(sp)
  810.             dc.w     $A83D
  811.         EndM
  812.     ELSE
  813.         IMPORT_CFM_FUNCTION    TEGetHiliteRgn
  814.     ENDIF
  815.  
  816. ;
  817. ; pascal void TESetScrapLength(long length)
  818. ;
  819.     IF GENERATINGCFM THEN
  820.         IMPORT_CFM_FUNCTION    TESetScrapLength
  821.     ENDIF
  822.  
  823. ;
  824. ; pascal OSErr TEFromScrap(void)
  825. ;
  826.     IF GENERATINGCFM THEN
  827.         IMPORT_CFM_FUNCTION    TEFromScrap
  828.     ENDIF
  829.  
  830. ;
  831. ; pascal OSErr TEToScrap(void)
  832. ;
  833.     IF GENERATINGCFM THEN
  834.         IMPORT_CFM_FUNCTION    TEToScrap
  835.     ENDIF
  836.  
  837. ;
  838. ; pascal void TESetClickLoop(TEClickLoopUPP clikProc, TEHandle hTE)
  839. ;
  840.     IF GENERATINGCFM THEN
  841.         IMPORT_CFM_FUNCTION    TESetClickLoop
  842.     ENDIF
  843.  
  844. ;
  845. ; pascal void TESetWordBreak(WordBreakUPP wBrkProc, TEHandle hTE)
  846. ;
  847.     IF GENERATINGCFM THEN
  848.         IMPORT_CFM_FUNCTION    TESetWordBreak
  849.     ENDIF
  850.  
  851. ;    There is no function to get/set the low-mem for FindWordHook at 0x07F8.
  852. ;    This is because it is not a low-mem ProcPtr. That address is the entry
  853. ;    in the OS TrapTable for trap 0xA0FE.  You can use Get/SetTrapAddress to 
  854. ;    acccess it.    
  855. ;
  856.     IF OLDROUTINENAMES  THEN
  857.     ENDIF
  858.     ENDIF ; __TEXTEDIT__
  859.